#include "boost/asio.hpp"
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>

#define BLOCK_SIZE 64 * 1024
#define POINT 2001
#define IP "127.0.0.1"
using namespace boost::asio;

typedef boost::shared_ptr<ip::tcp::socket> socket_ptr;

extern io_service service;
extern socket_ptr sock;
void sync2();
void async();
void handle_accept(socket_ptr sock, const boost::system::error_code &err);
void start_accept(socket_ptr sock);
int read_data(ip::tcp::socket &sock);
int send_data(ip::tcp::socket &sock);